package com.bckj.fastboot.core.operation.context;

import lombok.Getter;

import java.util.LinkedHashMap;

@Getter
public class OperationLinkedHashMap implements OperationContext {

    private final LinkedHashMap<String, Object> map;

    public OperationLinkedHashMap(int initialCapacity) {
        map = new LinkedHashMap<>(initialCapacity);
    }

    public static OperationLinkedHashMap of() {
        return new OperationLinkedHashMap(16);
    }

    public static OperationLinkedHashMap of(int initialCapacity) {
        return new OperationLinkedHashMap(initialCapacity);
    }

    @Override
    public void put(String key, Object value) {
        map.put(key, value);
    }

    @Override
    public Object get(String key) {
        return map.get(key);
    }

}
